<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 200px;
            height: 200px;
            /* 背景色 */
            /* background-color: skyblue; */

            /* 背景透明度rgba a=> alpha 取值 0-1 */
            background-color: rgba(255,0,0,0.5);
        }
        .box2{
            width: 200px;
            height: 200px;
            /* 渐变（上下左右+四个对角方向） */
            background-image: linear-gradient(to right bottom,#b7c6cc, #3ccf3c);
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
</body>
</html>